import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginView from '../views/login/LoginView.vue'
import IndexView from '../views/index/IndexView.vue'


// 导入你的 Vue 组件
import MemberListView from "../views/member/ListView.vue";
import ExhibitionListView from "../views/exhibition/ListView.vue";
import CategoryListView from "../views/category/ListView.vue";
import ModelListView from "../views/model/ListView.vue";
import CompanyListView from "../views/company/ListView.vue";
import AnalyticsListView from "../views/analytics/ListView.vue";

import AddExhibitionView from "../views/exhibition/AddView.vue"
import AddMemberView from "../views/member/AddView.vue"
import AddModelView from "../views/model/AddView.vue"
import AddCompanyView from "../views/company/AddView.vue"


Vue.use(VueRouter)

const commonRoutes = [
  {
    path: '/exhibition/list',
    name: 'exhibitionList',
    component: ExhibitionListView,
  },
  {
    path: '/member/list',
    name: 'memberList',
    component: MemberListView,
  },
  {
    path: '/category/list',
    name: 'categoryList',
    component: CategoryListView,
  },
  {
    path: '/model/list',
    name: 'modelList',
    component: ModelListView,
  },
  {
    path: '/company/list',
    name: 'companyList',
    component: CompanyListView,
  },
  {
    path: '/analytics/list',
    name: 'analyticsListV',
    component: AnalyticsListView,
  },
  {
    path: '/add-exhibition',
    name: 'addExhibition',
    component: AddExhibitionView, // Create a component for adding a member
  },
  {
    path: '/edit-exhibition/:id',
    name: 'editExhibition',
    component: AddExhibitionView, // Create a component for editing a member
  },
  {
    path: '/add-member',
    name: 'addMember',
    component: AddMemberView, // Create a component for adding a member
  },
  {
    path: '/edit-member/:id',
    name: 'editMember',
    component: AddMemberView, // Create a component for editing a member
  },
  {
    path: '/add-model',
    name: 'addModel',
    component: AddModelView, // Create a component for adding a model
  },
  {
    path: '/edit-model/:id',
    name: 'editModel',
    component: AddModelView, // Create a component for editing a model
  },
  {
    path: '/add-company',
    name: 'addCompany',
    component: AddCompanyView, // Create a component for adding a company
  },
  {
    path: '/edit-company/:id',
    name: 'editCompany',
    component: AddCompanyView, // Create a component for editing a company
  },
];
const routes = [
  {
    path: '/login',
    name: 'login',
    component: LoginView,
  },
  {
    path: '/index',
    name: 'index',
    component: IndexView,
    children: commonRoutes,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
